<?  layout("../layout/default.html") { ?>
<div class="admin-panel">
	<div class="tab">
		<div class="tab-head">
			<strong><? if(@data.isNew()){ ?>添加<? }else{ ?>编辑<?} ?></strong>
			<span class="tab-more"><a href="javascript:history.go(-1)" class="button  button-little bg-blue  icon-step-backward"> 返回</a></span>
			<ul class="tab-nav">
			  <li class="active"><a href="#tab-set">信息</a></li>
			</ul>
		</div>
		<div class="tab-body">
		<script text="text/javascript">
		function check(){
	    	var str1 = document.getElementById("scene_name").value.trim();
			var str2 = $("#scene_type").val();
			if(str1.length>12){
				alert("名称输入过长");
		        document.getElementById("scene_name").value="";
				return false;
			}
			if(str2.length>20){
				alert("id输入过长");
		        document.getElementById("scene_type").value="";
				return false;
			}
		}
		
		</script>
			<div class="tab-panel active" id="tab-set">
				<form method="post" class="form-x" action="">
					<div class="form-group">
						<div class="label"><label for="sitename">名称</label></div>
						<div class="field">
						<input type="text" class="input" id="scene_name" name="scene.name" size="200" placeholder="请填写名称" data-validate="required:请填写名称" value="${data.name!""}"/>
						</div>
					</div>
					<div class="form-group">
						<div class="label"><label for="sitename">图标id</label></div>
						<div class="field">
						<input type="text" class="input" id="scene_type" name="scene.type" size="200" placeholder="请填写图标id" data-validate="required:请填写图标id" value="${data.type!""}"/>
						</div>
					</div>
				<div class="form-button"><button class="button bg-main" type="submit" onclick="return check()">提交</button></div>
			    </form>
			</div>
		</div>
	</div>
</div>
<?  } ?>			